"""
@author: zjc
@file: test.py
@time: 2023/3/13 21:00
"""
import requests
import random
from hashlib import md5
import string
import time

url = 'http://127.0.0.1:8000/v1/user'
salt = "".join(random.choices(string.ascii_letters+string.digits+"_",k=6))
appid = 'wzry'
secretkey = '123456'
timestamp=time.time()
user_sign = appid + salt + secretkey+ str(timestamp)
m1 = md5()
m1.update(user_sign.encode(encoding="utf-8"))
sign = m1.hexdigest()
params={
    "id":"1",
    "api":"1",
    "appid":appid,
    "salt":salt,
    "sign":sign,
    "timestamp":timestamp
}
result=requests.get(url=url,params=params)
print(result.text)